package com.sss.hloster002;

public class Rectangle {
	private int length;// 长属性
	private int width;// 宽属性
	// 构造方法

	public Rectangle(int length, int width) {
		super();
		this.length = length;
		this.width = width;
	}

	public void getArea() {
		System.out.println("面积为：" + length * width);
	}

	public void getPer() {
		System.out.println("周长为：" + (length +  width) * 2);
	}

	public void showAll() {
		System.out.println("长为： " + length + "宽为： " + width);
		getArea();
		getPer();

	}
}
